import 'package:flutter_test/flutter_test.dart';
import 'package:im_app/im/util/DateUtil.dart';
import 'package:im_app/im/util/Md5Util.dart';
import 'package:logger/logger.dart';

void main() {
  var _logger = Logger(printer: PrettyPrinter(),);

  test("test date isAfter", () async {
     DateTime date = DateTime.now();
     DateTime newDate = date.add(Duration(minutes: -5));
     bool isAfter = DateUtil.hasExceededTime(date, 1);
     _logger.i("exceed 2 minute: ${isAfter}");
  });

  test("test sha512", () async {
    String dd = "你好中国";
    String cry = generateSha512(dd);
    _logger.i("sha512: ${cry}");
  });
}